<template>
	<div class="child">
		<h1>我是Child组件</h1>
		<button @click="sendComputer">把电脑给父亲</button>
	</div>
</template>

<script>
	export default {
		name:'Child',
		props:['getComputer'],
		data() {
			return {
				computer:'华硕-飞行堡垒'
			}
		},
		methods: {
			sendComputer(){
				this.getComputer(this.computer)
			}
		},
	}
</script>

<style scoped>
	.child{
		background-color: orange;
		padding: 20px;
	}
</style>